<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2020/9/28
  Time: 4:22 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

</head>
<body>

    <div id="sql"></div>
    <script src="${path}/plugins/jquery/jquery.min.js">
    </script>

    <script>
        $(function(){
            let sql = "insert into cust values";
            $.get("https://www.easy-mock.com/mock/5f71a30071dad5156af747f3/cust/cust",null,function(data){
                //console.log(data.data.book)
                let arr = data.data.cust;
                for(let i=0;i<arr.length;i++){
                    sql+="("
                    sql+=arr[i].id+",";
                    sql+="'"+arr[i].name+"'"+",";
                    sql+="'"+arr[i].password+"'"+",";
                    sql+="'"+arr[i].status+"'"+"),";
                };
                sql+=";<br>";
                $("#sql").html(sql);
            });

        })
    </script>
</body>
</html>
